﻿@model ItemModel
@using NewLife;
@using NewLife.Cube
@using XCode;
@using XCode.Configuration;

@{
    var name = Model.Name;
    var value = (Boolean)Model.Value;
    var type = Model.Type;

    var atts = HtmlHelper.AnonymousObjectToHtmlAttributes(new object { });
    if (!atts.ContainsKey("class")) atts.Add("class", "form-check-input");
}

<div class="input-group d-flex align-items-center form-switch form-check-custom mt-sm-3">
    @Html.CheckBox(name, value, atts)
</div>
